package com.stone.framework.message.task;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import io.swagger.annotations.ApiModelProperty;

public class ScheduleConfigReqBody {

    @ApiModelProperty(value = "主键，新增时不使用")
    private Long id;

    @ApiModelProperty(value = "服务名称")
    @NotBlank(message = "[serviceName] {title.notBlank}")
    private String serviceName;

    @ApiModelProperty(value = "job名称")
    @NotBlank(message = "[jobName] {title.notBlank}")
    private String jobName;

    @ApiModelProperty(value = "参数")
    private String params;

    @ApiModelProperty(value = "cron")
    @NotBlank(message = "[cron] {title.notBlank}")
    private String cron;

    @ApiModelProperty(value = "备注")
    @NotBlank(message = "[remark] {title.notBlank}")
    private String remark;

    @ApiModelProperty(value = "状态：DISABLED|ENABLED")
    @NotNull(message = "[code] {title.notNull}")
    @Pattern(regexp = "(DISABLED|ENABLED)", message = "[state] must be 'DISABLED|ENABLED'")
    private String state;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

}
